<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登陆框</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
	    <div  title="用户登陆" >
	    
	    	<table>
	    	
	    		<tr>
	    			<td>
	    				账号:
	    			</td>
	    			
	    			<td>
	    				<input type="text" name="account" id="account" autofocus="autofocus" required="required"/>
	    			</td>
	    			
	    			<td>
	    				密码:
	    			</td>
	    			
	    			<td>
	    				<input type="password" name="password" id="password" required="required"/> <input type="button" value="登陆" onclick="javascript:login();"/> 
	    			</td>
	    		</tr>
	    		
	    		<tr>
	    			<td colspan="4" id="note">
	    			
	    			<!-- a href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=100231532&redirect_uri=www.zozopo.com/user/qquserlogin.action&scope=get_user_info">
    				<img alt="" src="http://qzonestyle.gtimg.cn/qzone/vas/opensns/res/img/Connect_logo_6.png"/-->
	    			
	    			</td>
	    		</tr>
	    	</table>
	   

			
	</div>
	 
	
  </body>
  <script type="text/javascript">

  function login(){
	 // alert($('#account').attr('value'));
	  var url = "<%=basePath %>/user/dialog/logindialog_user.action?account="+$('#account').attr('value')+"&password="+$('#password').attr('value');
	//  alert(url);
	  $.getJSON(url, function(json){
		  
		  if(json.isSuccess=="true"){
			  location.reload();

		  }else{
			  $("#note").html("<font color='red'>提示:"+json.responseText+"</font>");
			//  alert(json.responseText);
		 }
		});
	 }

  </script>
</html>
